package com.xiao.hao.convertor;


import com.xiao.hao.config.LocalDateTimeConfig;
import com.xiao.hao.entity.XhUserInfo;
import com.xiao.hao.req.XhUserInfoFileUpdateReq;
import com.xiao.hao.req.XhUserInfoInsertReq;
import com.xiao.hao.req.XhUserInfoUpdateReq;
import com.xiao.hao.resp.XhUserInfoResp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Description 用户表 类型转换
 * @Author xiaohao
 * @Date 2025-03-01 10:58:34
 */
@Mapper(uses = {LocalDateTimeConfig.class}, componentModel = "spring")
public interface XhUserInfoConvertor {

    XhUserInfoConvertor INSTANCE = Mappers.getMapper(XhUserInfoConvertor.class);

    /**
     * 功能描述:
     *
     * @param req
     * @return com.xiao.hao.entity.XhUserInfo
     * @author xiaohao
     * @date 2025-03-01 10:58:34
     */
    XhUserInfo reqToEntity(XhUserInfoInsertReq req);

    /**
     * 功能描述:
     *
     * @param req
     * @return com.xiao.hao.entity.XhUserInfo
     * @author xiaohao
     * @date 2025-03-01 10:58:34
     */
    XhUserInfo reqToEntity(XhUserInfoUpdateReq req);

    XhUserInfo reqToEntity(XhUserInfoFileUpdateReq req);


    /**
     * 功能描述:
     *
     * @param entity
     * @return com.xiao.hao.resp.XhUserInfoResp
     * @author xiaohao
     * @date 2025-03-01 10:58:34
     */
    XhUserInfoResp entityToResp(XhUserInfo entity);

    /**
     * 功能描述:
     *
     * @param list
     * @return java.util.List<com.xiao.hao.resp.XhUserInfoResp>
     * @author xiaohao
     * @date 2025-03-01 10:58:34
     */
    List<XhUserInfoResp> entityListToRespList(List<XhUserInfo> list);
}



